Restoration for Video Coding with Self-guided Filtering and Subspace Projection

ABSTRACT

Restoring a degraded frame resulting from reconstruction of a source frame is described. A method includes generating, using first restoration parameters, a first guide tile for a degraded tile of the degraded frame, determining a projection parameter for a projection operation, and encoding, in an encoded bitstream, the first restoration parameters and the projection parameter. The projection operation relates differences between a source tile of the source frame and the degraded tile to differences between the first guide tile and the degraded tile.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional PatentApplication Ser. No. 62/417,545, filed on Nov. 4, 2016, the entiredisclosure of which is hereby incorporated by reference.

BACKGROUND

Digital video streams can represent video using a sequence of frames orstill images. Digital video can be used for various applicationsincluding, for example, video conferencing, high definition videoentertainment, video advertisements, or sharing of user-generatedvideos. A digital video stream can contain a large amount of data andconsume a significant amount of computing or communication resources ofa computing device for processing, transmission or storage of the videodata. Various approaches have been proposed to reduce the amount of datain video streams, including compression and other encoding techniques.

Encoding using compression can be performed by breaking frames or imagesinto blocks that are then compressed, often using encoding techniquesthat result in loss of some data. A decoder can apply one or morefilters to a reconstructed frame in order to remove or smooth outartifacts caused by (e.g., lossy) encoding.

SUMMARY

The disclosure relates in general to video coding, and in particular torestoration using filtering and subspace projection.

One aspect of the disclosed implementations is a method of restoring adegraded frame resulting from reconstruction of a source frame. Themethod includes generating, using first restoration parameters, a firstguide tile for a degraded tile of the degraded frame, determining aprojection parameter for a projection operation, and encoding, in anencoded bitstream, the first restoration parameters and the projectionparameter. The projection operation relates differences between a sourcetile of the source frame and the degraded tile to differences betweenthe first guide tile and the degraded tile.

Another aspect is an apparatus for restoring a degraded frame resultingfrom reconstruction of a source frame. The apparatus includes aprocessor configured to execute instructions stored in a non-transitorystorage medium to generate, using first restoration parameters, a firstguide tile for a first degraded tile of the degraded frame, determine aprojection parameter for a projection operation, and encode, in anencoded bitstream, the first restoration parameters and the projectionparameter.

Another aspect is a method of restoring a degraded frame. The methodincludes determining, from an encoded bitstream, a first projectionparameter and a second projection parameter, determining, from theencoded bitstream, first restoration parameters and second restorationparameters, generating, using the first restoration parameters, a firstguide tile for a degraded tile, generating, using the second restorationparameters, a second guide tile for the degraded tile, and performing aprojection operation using the first guide tile, the second guide tile,the first restoration parameters, and the second restoration parametersto generate a reconstructed tile of a reconstructed frame.

These and other aspects of the present disclosure are disclosed in thefollowing detailed description of the embodiments, the appended claimsand the accompanying figures.

BRIEF DESCRIPTION OF THE DRAWINGS

The description herein makes reference to the accompanying drawingswherein like reference numerals refer to like parts throughout theseveral views.

FIG. 1 is a schematic of a video encoding and decoding system.

FIG. 2 is a block diagram of an example of a computing device that canimplement a transmitting station or a receiving station.

FIG. 3 is a diagram of a video stream to be encoded and subsequentlydecoded.

FIG. 4 is a block diagram of an encoder according to implementations ofthis disclosure.

FIG. 5 is a block diagram of a decoder according to implementations ofthis disclosure.

FIG. 6 is a flowchart diagram of a process for restoring a degradedframe at an encoder according to an implementation of this disclosure.

FIG. 7 is a flowchart diagram of a process for generating a guide tilefor a degraded tile according to an implementation of this disclosure.

FIG. 8 is an illustration of 3×3 pixel windows according toimplementations of this disclosure.

FIGS. 9A and 9B are illustrations of examples of weights assigned tolocations of 3×3 windows according to implementations of thisdisclosure.

FIG. 10 is a flowchart diagram of a process for restoring a degradedframe at a decoder according to an implementation of this disclosure.

DETAILED DESCRIPTION

As mentioned above, compression schemes related to coding video streamscan include breaking images into blocks and generating a digital videooutput bitstream using one or more techniques to limit the informationincluded in the output. A received bitstream can be decoded to re-createthe blocks and the source images from the limited information. Encodinga video stream, or a portion thereof, such as a frame or a block, caninclude using temporal or spatial similarities in the video stream toimprove coding efficiency. For example, a current block of a videostream can be encoded based on identifying a difference (residual)between previously coded pixel values and those in the current block. Inthis way, only the residual and/or parameters used to generate theresidual need be added to the bitstream instead of including theentirety of the current block. The residual can be encoded using a lossyquantization step. Decoding (i.e., reconstructing) an encoded block fromsuch a residual often results in a distortion between the original(i.e., source) block and the reconstructed block.

Post-reconstruction loop filters can be used in various ways to improvereconstructed frames distorted or degraded as a result of the encodingand decoding processes. For example, in-loop deblocking filters can beused to modify pixel values near borders between blocks to limit thevisibility of those borders within the reconstructed frame. Other loopfilters can be used to bring the reconstructed images closer to thesource images by, for example, adding offsets that are determined at theencoder to pixel values of the reconstructed frame. Those loop filtersoperate in a blind setting (i.e., without access to both a source frameand its associated reconstructed frame).

According to the teachings herein, access to both the source andreconstructed frames at the encoder can make it possible to sendinformation from the encoder that guides the decoder into achievingsuperior restoration. Among other things, restoration in video codingusing filtering and subspace projection is described. A guided filteruses a frame to be filtered and a guide image (e.g., a guide tile) of atleast a portion of a frame. Making the guide image and the frame portionperceptually the same (e.g., reducing their differences to close tozero) results in an edge-preserved, de-noised image. That is, theresulting image is smoothed where there are no edges, and edges arepreserved (i.e., the edges are not smoothed). Restoration parameters fora projection formula based on the frame differences can be encoded andsignaled to the decoder. The restoration described herein can beimplemented in a switchable restoration framework, which refers to theability to switch between (e.g., use) different restoration techniquesor types for different portions of a reconstructed frame. Varioussystematic errors (such as DC shifts in flat regions of frames), orcolor bias, can be removed or at least partially compensated so therestored image can be brought closer to the source image.

Restoration using filtering and subspace projection is described hereinfirst with reference to a system in which the teachings can beincorporated. As alluded to above, in the restoration herein, the framecan be restored in one or more portions. Each of these portions isreferred to herein respectively as a “tile,” where tiles may or may notoverlap each other.

FIG. 1 is a schematic of a video encoding and decoding system 100. Atransmitting station 102 can be, for example, a computer having aninternal configuration of hardware such as that described in FIG. 2.However, other suitable implementations of the transmitting station 102are possible. For example, the processing of the transmitting station102 can be distributed among multiple devices.

A network 104 can connect the transmitting station 102 and a receivingstation 106 for encoding and decoding of the video stream. Specifically,the video stream can be encoded in the transmitting station 102 and theencoded video stream can be decoded in the receiving station 106. Thenetwork 104 can be, for example, the Internet. The network 104 can alsobe a local area network (LAN), wide area network (WAN), virtual privatenetwork (VPN), cellular telephone network or any other means oftransferring the video stream from the transmitting station 102 to, inthis example, the receiving station 106.

The receiving station 106, in one example, can be a computer having aninternal configuration of hardware such as that described in FIG. 2.However, other suitable implementations of the receiving station 106 arepossible. For example, the processing of the receiving station 106 canbe distributed among multiple devices.

Other implementations of the video encoding and decoding system 100 arepossible. For example, an implementation can omit the network 104. Inanother implementation, a video stream can be encoded and then storedfor transmission at a later time to the receiving station 106 or anyother device having memory. In one implementation, the receiving station106 receives (e.g., via the network 104, a computer bus, and/or somecommunication pathway) the encoded video stream and stores the videostream for later decoding. In an example implementation, a real-timetransport protocol (RTP) is used for transmission of the encoded videoover the network 104. In another implementation, a transport protocolother than RTP can be used, e.g., an HTTP-based video streamingprotocol.

When used in a video conferencing system, for example, the transmittingstation 102 and/or the receiving station 106 can include the ability toboth encode and decode a video stream as described below. For example,the receiving station 106 could be a video conference participant whoreceives an encoded video bitstream from a video conference server(e.g., the transmitting station 102) to decode and view and furtherencodes and transmits its own video bitstream to the video conferenceserver for decoding and viewing by other participants.

FIG. 2 is a block diagram of an example of a computing device 200 thatcan implement a transmitting station or a receiving station. Forexample, the computing device 200 can implement one or both of thetransmitting station 102 and the receiving station 106 of FIG. 1. Thecomputing device 200 can be in the form of a computing system includingmultiple computing devices, or in the form of a single computing device,for example, a mobile phone, a tablet computer, a laptop computer, anotebook computer, a desktop computer, and the like.

A CPU 202 in the computing device 200 can be a central processing unit.Alternatively, the CPU 202 can be any other type of device, or multipledevices, capable of manipulating or processing information now-existingor hereafter developed. Although the disclosed implementations can bepracticed with a single processor as shown, e.g., the CPU 202,advantages in speed and efficiency can be achieved using more than oneprocessor.

A memory 204 in the computing device 200 can be a read-only memory (ROM)device or a random access memory (RAM) device in an implementation. Anyother suitable type of storage device can be used as the memory 204. Thememory 204 can include code and data 206 that is accessed by the CPU 202using a bus 212. The memory 204 can further include an operating system208 and application programs 210, the application programs 210 includingat least one program that permits the CPU 202 to perform the methodsdescribed here. For example, the application programs 210 can includeapplications 1 through N, which further include a video codingapplication that performs the methods described here. The computingdevice 200 can also include a secondary storage 214, which can, forexample, be a memory card used with a computing device 200 that ismobile. Because the video communication sessions can contain asignificant amount of information, they can be stored in whole or inpart in the secondary storage 214 and loaded into the memory 204 asneeded for processing.

The computing device 200 can also include one or more output devices,such as a display 218. The display 218 can be, in one example, a touchsensitive display that combines a display with a touch sensitive elementthat is operable to sense touch inputs. The display 218 can be coupledto the CPU 202 via the bus 212. Other output devices that permit a userto program or otherwise use the computing device 200 can be provided inaddition to or as an alternative to the display 218. When the outputdevice is or includes a display, the display can be implemented invarious ways, including by a liquid crystal display (LCD), a cathode-raytube (CRT) display or light emitting diode (LED) display, such as anorganic LED (OLED) display.

The computing device 200 can also include or be in communication with animage-sensing device 220, for example a camera, or any otherimage-sensing device 220 now existing or hereafter developed that cansense an image such as the image of a user operating the computingdevice 200. The image-sensing device 220 can be positioned such that itis directed toward the user operating the computing device 200. In anexample, the position and optical axis of the image-sensing device 220can be configured such that the field of vision includes an area that isdirectly adjacent to the display 218 and from which the display 218 isvisible.

The computing device 200 can also include or be in communication with asound-sensing device 222, for example a microphone, or any othersound-sensing device now existing or hereafter developed that can sensesounds near the computing device 200. The sound-sensing device 222 canbe positioned such that it is directed toward the user operating thecomputing device 200 and can be configured to receive sounds, forexample, speech or other utterances, made by the user while the useroperates the computing device 200.

Although FIG. 2 depicts the CPU 202 and the memory 204 of the computingdevice 200 as being integrated into a single unit, other configurationscan be utilized. The operations of the CPU 202 can be distributed acrossmultiple machines (each machine having one or more of processors) thatcan be coupled directly or across a local area or other network. Thememory 204 can be distributed across multiple machines such as anetwork-based memory or memory in multiple machines performing theoperations of the computing device 200. Although depicted here as asingle bus, the bus 212 of the computing device 200 can be composed ofmultiple buses. Further, the secondary storage 214 can be directlycoupled to the other components of the computing device 200 or can beaccessed via a network and can comprise a single integrated unit such asa memory card or multiple units such as multiple memory cards. Thecomputing device 200 can thus be implemented in a wide variety ofconfigurations.

FIG. 3 is a diagram of an example of a video stream 300 to be encodedand subsequently decoded. The video stream 300 includes a video sequence302. At the next level, the video sequence 302 includes a number ofadjacent frames 304. While three frames are depicted as the adjacentframes 304, the video sequence 302 can include any number of adjacentframes 304. The adjacent frames 304 can then be further subdivided intoindividual frames, e.g., a frame 306. At the next level, the frame 306can be divided into a series of segments 308 or planes. The segments 308can be subsets of frames that permit parallel processing, for example.The segments 308 can also be subsets of frames that can separate thevideo data into separate colors. For example, the frame 306 of colorvideo data can include a luminance plane and two chrominance planes. Thesegments 308 can be sampled at different resolutions.

Whether or not the frame 306 is divided into the segments 308, the frame306 can be further subdivided into blocks 310, which can contain datacorresponding to, for example, 16×16 pixels in the frame 306. The blocks310 can also be arranged to include data from one or more segments 308of pixel data. The blocks 310 can also be of any other suitable sizesuch as 4×4 pixels, 8×8 pixels, 16×8 pixels, 8×16 pixels, 16×16 pixelsor larger.

FIG. 4 is a block diagram of an encoder 400 in accordance withimplementations of this disclosure. The encoder 400 can be implemented,as described above, in the transmitting station 102 such as by providinga computer software program stored in memory, for example, the memory204. The computer software program can include machine instructionsthat, when executed by a processor such as the CPU 202, cause thetransmitting station 102 to encode video data in the manner describedherein. The encoder 400 can also be implemented as specialized hardwareincluded in, for example, the transmitting station 102. The encoder 400has the following stages to perform the various functions in a forwardpath (shown by the solid connection lines) to produce an encoded orcompressed bitstream 420 using the video stream 300 as input: anintra/inter prediction stage 402, a transform stage 404, a quantizationstage 406, and an entropy encoding stage 408. The encoder 400 can alsoinclude a reconstruction path (shown by the dotted connection lines) toreconstruct a frame for encoding of future blocks. In FIG. 4, theencoder 400 has the following stages to perform the various functions inthe reconstruction path: a dequantization stage 410, an inversetransform stage 412, a reconstruction stage 414, and a loop filteringstage 416. Other structural variations of the encoder 400 can be used toencode the video stream 300.

When the video stream 300 is presented for encoding, the frame 306 canbe processed in units of blocks. At the intra/inter prediction stage402, a block can be encoded using intra-frame prediction (also calledintra-prediction) or inter-frame prediction (also calledinter-prediction), or a combination both. In any case, a predictionblock can be formed. In the case of intra-prediction, all or a part of aprediction block can be formed from samples in the current frame thathave been previously encoded and reconstructed. In the case ofinter-prediction, all or part of a prediction block can be formed fromsamples in one or more previously constructed reference framesdetermined using motion vectors.

Next, still referring to FIG. 4, the prediction block can be subtractedfrom the current block at the intra/inter prediction stage 402 toproduce a residual block (also called a residual). The transform stage404 transforms the residual into transform coefficients in, for example,the frequency domain using block-based transforms. Such block-basedtransforms include, for example, the Discrete Cosine Transform (DCT) andthe Asymmetric Discrete Sine Transform (ADST). Other block-basedtransforms are possible. Further, combinations of different transformscan be applied to a single residual. In one example of application of atransform, the DCT transforms the residual block into the frequencydomain where the transform coefficient values are based on spatialfrequency. The lowest frequency (DC) coefficient at the top-left of thematrix and the highest frequency coefficient at the bottom-right of thematrix. It is worth noting that the size of a prediction block, andhence the resulting residual block, can be different from the size ofthe transform block. For example, the prediction block can be split intosmaller blocks to which separate transforms are applied.

The quantization stage 406 converts the transform coefficients intodiscrete quantum values, which are referred to as quantized transformcoefficients, using a quantizer value or a quantization level. Forexample, the transform coefficients can be divided by the quantizervalue and truncated. The quantized transform coefficients are thenentropy encoded by the entropy encoding stage 408. Entropy coding can beperformed using any number of techniques, including token and binarytrees. The entropy-encoded coefficients, together with other informationused to decode the block, which can include for example the type ofprediction used, transform type, motion vectors and quantizer value, arethen output to the compressed bitstream 420. The information to decodethe block can be entropy coded into block, frame, slice and/or sectionheaders within the compressed bitstream 420. The compressed bitstream420 can also be referred to as an encoded video stream or encoded videobitstream, and the terms will be used interchangeably herein.

The reconstruction path in FIG. 4 (shown by the dotted connection lines)can be used to ensure that both the encoder 400 and a decoder 500(described below) use the same reference frames and blocks to decode thecompressed bitstream 420. The reconstruction path performs functionsthat are similar to functions that take place during the decodingprocess that are discussed in more detail below, including dequantizingthe quantized transform coefficients at the dequantization stage 410 andinverse transforming the dequantized transform coefficients at theinverse transform stage 412 to produce a derivative residual block (alsocalled a derivative residual). At the reconstruction stage 414, theprediction block that was predicted at the intra/inter prediction stage402 can be added to the derivative residual to create a reconstructedblock. The loop filtering stage 416 can be applied to the reconstructedblock to reduce distortion such as blocking artifacts.

Other variations of the encoder 400 can be used to encode the compressedbitstream 420. For example, a non-transform based encoder 400 canquantize the residual signal directly without the transform stage 404for certain blocks or frames. In another implementation, an encoder 400can have the quantization stage 406 and the dequantization stage 410combined into a single stage.

FIG. 5 is a block diagram of a decoder 500 in accordance withimplementations of this disclosure. The decoder 500 can be implementedin the receiving station 106, for example, by providing a computersoftware program stored in the memory 204. The computer software programcan include machine instructions that, when executed by a processor suchas the CPU 202, cause the receiving station 106 to decode video data inthe manner described in FIG. 10 below. The decoder 500 can also beimplemented in hardware included in, for example, the transmittingstation 102 or the receiving station 106.

The decoder 500, similar to the reconstruction path of the encoder 400discussed above, includes in one example the following stages to performvarious functions to produce an output video stream 516 from thecompressed bitstream 420: an entropy decoding stage 502, adequantization stage 504, an inverse transform stage 506, anintra/inter-prediction stage 508, a reconstruction stage 510, a loopfiltering stage 512 and a deblocking filtering stage 514. Otherstructural variations of the decoder 500 can be used to decode thecompressed bitstream 420.

When the compressed bitstream 420 is presented for decoding, the dataelements within the compressed bitstream 420 can be decoded by theentropy decoding stage 502 to produce a set of quantized transformcoefficients. The dequantization stage 504 dequantizes the quantizedtransform coefficients (e.g., by multiplying the quantized transformcoefficients by the quantizer value), and the inverse transform stage506 inverse transforms the dequantized transform coefficients using theselected transform type to produce a derivative residual that can beidentical to that created by the inverse transform stage 412 in theencoder 400. Using header information decoded from the compressedbitstream 420, the decoder 500 can use the intra/inter-prediction stage508 to create the same prediction block as was created in the encoder400, e.g., at the intra/inter prediction stage 402. At thereconstruction stage 510, the prediction block can be added to thederivative residual to create a reconstructed block. The loop filteringstage 512 can be applied to the reconstructed block to reduce blockingartifacts. Other filtering can be applied to the reconstructed block. Inan example, the deblocking filtering stage 514 is applied to thereconstructed block to reduce blocking distortion as described below,and the result is output as an output video stream 516. The output videostream 516 can also be referred to as a decoded video stream, and theterms will be used interchangeably herein.

Other variations of the decoder 500 can be used to decode the compressedbitstream 420. For example, the decoder 500 can produce the output videostream 516 without the deblocking filtering stage 514. In someimplementations of the decoder 500, the deblocking filtering stage 514is applied before the loop filtering stage 512. Additionally, oralternatively, the encoder 400 includes a deblocking filtering stage inaddition to the loop filtering stage 416.

FIG. 6 is a flowchart diagram of a process 600 for restoring a degradedframe at an encoder according to an implementation of this disclosure.The process 600 can be implemented in an encoder such as the encoder 400and can be implemented, for example, as a software program that can beexecuted by computing devices such as transmitting station 102. Thesoftware program can include machine-readable instructions that can bestored in a memory such as the memory 204 or the secondary storage 214,and that can be executed by a processor, such as CPU 202, to cause thecomputing device to perform the process 600. In at least someimplementations, the process 600 can be performed in whole or in part bythe loop filtering stage 416 of the encoder 400.

The process 600 can be implemented using specialized hardware orfirmware. Some computing devices can have multiple memories, multipleprocessors, or both. The steps or operations of the process 600 can bedistributed using different processors, memories, or both. Use of theterms “processor” or “memory” in the singular encompasses computingdevices that have one processor or one memory as well as devices thathave multiple processors or multiple memories that can be used in theperformance of some or all of the recited steps.

The process 600 initially receives a degraded tile of a source frame.The degraded tile can be, for example, all or a portion of areconstructed frame from a reconstruction loop of an encoder. Herein,the reconstructed frame is referred to as a degraded frame so as todistinguish it from the final reconstructed frame after filtering. Thefinal reconstructed frame is referred to herein as a restored frame. Forexample, all or a portion of the degraded frame could be received fromthe reconstruction stage 414 at the loop filtering stage 416 of theencoder 400. The degraded frame can be deblocked before the process 600occurs.

In an example, the process 600 can receive the entire degraded frame andpartition the frame into one or more degraded tiles. That is, theprocess 600 can partition a degraded frame into one or more tiles.Alternatively, the process 600 can receive degraded tiles as partitionedat a previous stage of an encoder or decoder. That is, the process 600can process whatever unit of a frame (whether a tile or the frameitself) that the process 600 receives.

The size of each tile can be selected based on a tradeoff betweenlocalization of the statistical properties of the degraded frame and thenumber of bits to be used in the encoded bitstream. For example, if asmaller tile size is selected, better localization can be achieved;however, a higher number of bits will be used for encoding the degradedframe. Alternatively, tile sizes can be selected independent ofstatistical properties of the frame, such as by reference to thedegraded frame size. For example, if the frame size is greater than256×256 pixels, the tile size can be set to 256×256 pixels; otherwise,the tile size is set to 120×120 pixels. The tile size can be selectedbased on the frame size exceeding a threshold value. The tile size canbe set to the size of the frame such that the frame includes only onetile. Other ways of selecting tile sizes can be used withimplementations of this disclosure.

At 602, a guide tile (i.e., a first guide tile) is generated for adegraded tile. More than one guide tile can be used for restoration of adegraded tile. The guide tile can be referred to as a cheap restoredversion of the degraded tile as it is desirably generated usingcomputations with relatively low complexity. For example, a guide tilecan be generated for pixel locations within the guide tile by filteringor smoothing original pixel values at the respective locations usingadjacent pixel values. An original pixel value refers to a pixel valueof the co-located pixel of the source frame. The guide tile can begenerated using restoration parameters (i.e., first restorationparameters). When multiple guide tiles are used for restoration, theycan be generated using different parameters for the filtering orsmoothing in the same technique. For example, a first guide tile can begenerated using first restoration parameters and a second guide tile canbe generated using second restoration parameters. Less desirably, butstill possibly, the process 600 can use different techniques forgenerating guide tiles for a degraded tile.

In an example herein, a guided tile can be generated using a techniquedescribed in Kaiming He, Jian Sun, and Xiaoou Tang, Guided imagefiltering, in Computer Vision—ECCV 2010, Springer Berlin Heidelberg2010, pp. 1-14, which is incorporated herein in its entirety byreference.

FIG. 7 is a flowchart diagram of a process 700 for generating a guidetile for a degraded tile according to an implementation of thisdisclosure. The process 700 can be used at 602 of the process 600 togenerate a guide tile for a degraded tile. The process 700 can beperformed for pixels of a degraded tile. In an example, the process 700can be performed for each pixel of the degraded tile. Inputs to theprocess 700 can include restoration parameters radius r and noise e,which are positive values and are further described below.Alternatively, the process 700 can select a radius and a noise value. Inan example, the radius and noise value can be selected from a codebook(i.e., a codebook of radii and noise values).

At 702, the mean μ (i.e., pixel mean) and variance σ² (i.e., pixelvariance) in a window of pixels with the radius r around a pixel aredetermined. The window (i.e., a first window) with a radius of r arounda pixel is the set of pixel values in a (2r+1)(2r+1) window centered at,and including, the pixel. For example, if the radius r=1, then thewindow is the 3×3 set of pixels centered at the pixel; if the radiusr=2, then the window is the 5×5 set of pixels centered at the pixel. Forpixels on the edges of the tile such that the window around the pixelwould include pixels from outside the title, the mean μ and variance σ²determination can be adjusted such that only the values of pixels withinthe tile are included in the determination of the mean μ and varianceσ². Reference is now made to FIG. 8 for an illustration.

FIG. 8 is an illustration of 3×3 pixel windows according toimplementations of this disclosure. A line 802 is an edge of a tile 800.For a radius r=1, when calculating the mean μ and variance σ² for apixel 804, only the values a-f are considered. On the other hand, as thepixels h-p of the 3×3 window of a pixel 806 are all inside the tile 800,then all of the h-p pixel values are used in calculating the mean μ andvariance σ² of the pixel 806. In an implementation, the mean μ andvariance σ² can be computed using a box filter, which is a technique forcomputing the mean and variance of pixels in a window of arbitrary size.

At 704, a baseline value f is determined for the pixel. The baselinevalue is determined using the pixel variance and the noise value. Thebaseline value f is calculated using equation (1):

f=σ²/(σ² +e)  (1)

As can be seen, the baseline value f is a value smaller than 1. When thevariance σ² is large, the baseline value f approaches 1. That is, whenthe variance σ² is high in the window around the pixel, then thebaseline value f approaches 1. A high variance can indicate theexistence of an edge at or close to the pixel. If, on the other hand,the variance σ² is small, then the baseline value f approaches 0. Thenoise value e can be used as a thresholding value: The noise value e candetermine how fast the baseline value f decays or increases.

At 706, a smoothing value g is determined for the pixel. The smoothingvalue g can be determined using the pixel mean μ and the baseline valuef. The smoothing value g can be calculated using equation (2):

g=(1−f)μ  (2)

As can be seen, when the variance σ² is large and the baseline value fis close to 1, the smoothing value g approaches 0.When the variance σ²is small and the baseline value f is close to 0, the smoothing value gapproaches the mean μ. The impact of the smoothing value g isillustrated below with respect to 710.

At 708, an average baseline value f_(av) and an average smoothing valueg_(av) for the pixel are determined. That is, the average of the variousbaseline values f and the smoothing values g, referred to as the averagebaseline value f_(av) and the average smoothing value g_(av),respectively, are calculated at 708 using pixel values of the firstdegraded tile in a second window surrounding the pixel location. Theaverage baseline value f_(av) and the average smoothing value g_(av) canbe calculated based on the baseline values f and the smoothing values gof the pixel values encompassed by the same size window (i.e.,(2r+1)(2r+1) window) used to calculate the baseline value f and thesmoothing value g for the pixel. That is, the first window can have thesame size as the second window. However, better results may be obtainedwhen the average baseline value f_(av) and the average smoothing valueg_(av) for a pixel are calculated using a 3×3 window regardless of thevalue of the radius r used in 702.

In order to eliminate division operations in calculating the averagebaseline value f_(av) and the average smoothing value g_(av), theaverage baseline value f_(av) and the average smoothing value g_(av) canbe approximated using weighted sum of values in the window used in thecalculations of f_(av) and g_(av) (e.g., the (2r+1)(2r+1) window or the3×3 window, as the case may be). In general, for example, the weightingcan be the highest for the values of the current pixel location, and bereduced for pixel locations as they extend away from the current pixellocation.

FIGS. 9A and 9B are illustrations of examples of weights 900 and 950assigned to locations of 3×3 windows according to implementations ofthis disclosure. FIG. 9A illustrates an example of weights 900 assignedto a 3×3 window. In this example, the four corner values are eachassigned a weight of 3, and the other five values of the window are eachassigned a weight of 4. As such, the total of the weights 900 is 32(equal to 3*4+4*5), which is equivalent to 2⁵. Assuming the windowcentered at 806 is considered, then the average baseline value f_(av)(and similarly for the average smoothing value g_(av)) can be calculatedas (3h+4i+3j+4k+4l+4m+3n+4o+3p)>>5 (where>>is a right bit-shiftoperator).

FIG. 9B illustrates another example of weights 950 assigned to a 3×3window. A weight of 20 is assigned to the center location, a weight of11 is assigned to each of the corners of the 3×3 window, and a weight of16 is assigned to the other locations. The sum of the weights 950 is 128(equal to 2⁷); thus, a right bit-shift operation by 7 can be applied tothe weighted sum.

Returning to FIG. 7, a guide pixel value z for the current pixellocation in the guide tile is determined at 710. The guide pixel value zcan be calculated using formula (3), where x is the co-located pixelvalue (i.e., the value of the pixel in the degraded tile that is at thesame position as the location of the current pixel):

z=x·f _(av) +g _(av)  (3)

A smoothing value g that approaches the mean μ indicates that the guidepixel value z will be close to the mean μ. As such, if the smoothingvalue g approaches the mean μ, and the baseline value f approaches 0,then the degraded pixel value x is weighted less and the guide pixelvalue z is closer to the average smoothing value g_(av) of the pixelwindow around the current pixel location. That is, a smoothing effect isapplied to the degraded pixel x. On the other hand, when the baselinevalue f is close to 1, indicating a pixel close to an edge, then thesmoothing value g is small. As such, less smoothing and filtering isapplied to the degraded pixel value x and the guide pixel value zreceives most of its value from the degraded pixel value x and less fromthe values of its surrounding pixels. The average smoothing value g_(av)can be considered an edge-dependence value. In an implementation, x canbe the value of the pixel in the source tile that is at the sameposition as the location of the current pixel. In such animplementation, x would be referred to as the original pixel value x andall other aspects of the disclosure herein can remain the same.

Returning to the process 600 of FIG. 6, a projection parameter for aprojection operation that relates tile differences, also called asubspace projection, is determined at 604. For example, the projectionoperation can project a difference between a source tile of the sourceframe and the degraded tile into a subspace generated by a differencebetween the guide tile and the degraded tile. For purposes of theexplanation herein, processing at 604 is described with reference to twoguide tiles, a guide tile Y₁ and a guide tile Y₂. For example, the guidetile Y₁ can be generated as described above in the process 700 using aradius r₁ and a noise e₁ as restoration parameters, and the guide tileY₂ can be generated as described above in the process 700 using a radiusr₂ and a noise e₂ as restoration parameters. As such, the projectionoperation relates (e.g., approximates) differences between a source tileof the source frame and the first degraded tile to differences betweenthe first guide tile and the first degraded tile and the differencesbetween the source tile of the source frame and the first degraded tileto differences between the second guide tile and the first degradedtile. However, one, two, or more guide tiles Y_(n) can be used. Usingthe projection parameter(s), the projection operation can be used togenerate a reconstructed tile Y_(R).

The projection operation can be performed using equation (4):

Y _(R) =Y+Y+α(Y₁ −Y)+β(Y₂ −Y),  (4)

where α and β are projection parameters.

Subtracting values of the degraded tile Y from both sides shows that thevector (Y_(R)−Y) is a linear combination of the vectors (Y₁−Y) and(Y₂−Y). As such, the projection operation includes respective differenceterms where each difference term uses a respective guide tile (inequation (4), these are guide tile Y₁ and guide tile Y₂), and theprojection parameter includes a respective different projectionparameter for each respective difference term (in equation (4), a firstprojection parameter a corresponding to the difference term (Y₁−Y), anda second projection parameter β corresponding to the difference term(Y₂−Y)). Desirably, the reconstructed tile Y_(R) has pixel values equal,or relatively close, to the pixel values of collocated pixels of thesource tile Y_(S). Even when each of the vectors (Y₁−Y) and (Y₂−Y)separately may not be close to the source tile Y_(S), the subspacegenerated by the vectors (Y₁−Y) and (Y₂−Y), at the closest point, may besubstantially closer than either of them separately. Solving theequation (4) for the projection parameters α and β results in thefollowing equation (5):

{α, β}^(T)=(A ^(T) A)⁻¹ A ^(T) b  (5)

In equation (5), A={(Y₁−Y), (Y₂−Y)} and b=Ys−Y. In this example, each ofY₁, Y₂, Y, and Y_(S) is assumed to be a column vector that includespixels from the respective tile.

The processing at 604 can be repeated for different values (orcombination of values) for the radius r and the noise e for therestoration parameters to determine which combination of values resultsin the least error between the reconstructed tile Y_(R) and the sourcetile Y_(S). The least error can be a mean square error between pixelvalues of the respective tiles. The least error can be a sum of absolutedifferences error between pixel values of the respective tiles. Anyother suitable least error measure can be used. The different values forthe restoration parameters to be used at 604 can be selected from acodebook. For example, the codebook can be a codebook of combinations ofradii and noise values {r₁, r₂, e₁, e₂}. The codebook can be derivedempirically.

At 606, the restoration parameters and the projection parameterdetermined at 604 are encoded in the bitstream. In the above example,the restoration parameters are r₁, r₂, e₁, and e₂. The restorationparameters can be encoded into the bitstream for communication in thebitstream to a decoder, such as the decoder 500 of FIG. 5.Alternatively, where a codebook is used, the selected codebook entry{r₁, r₂, e₁, e₂} can instead be encoded into the bitstream by an indexthat represents the selected codebook entry. As such, encoding the firstrestoration parameters can mean encoding a codebook index. The decoder,which also has the codebook, can use the index to identify therestoration parameters. For example, if the codebook contains 8 entries,then 3 bits may be required to encode the selected index entry. In thecase where the codebook is not known to the decoder, other means ofencoding at least some of the selected restoration parameters can beused.

The projection parameters α and β corresponding to the selectedprojection parameters at 604 are also communicated in the bitstream. Asthe projection parameters α and β can be double precision values,quantization of the values can occur before they are included in thebitstream. The quantization scheme allocated to the projectionparameters α and β can depend on the number of bits available in theencoded bitstream for the projection parameters α and β. When highprecision is required for the projection parameters, seven bits can, forexample, be used to transmit each of α and β.

When the process 600 is performed in whole or in part by the loopfiltering stage 416 of the encoder 400, a reconstructed image, formedfrom reconstructed tiles (in the case where multiple tiles are used forthe degraded image) can be used for predicting subsequent frames.

When the degraded frame is formed of multiple degraded tiles, eachdegraded tile of the multiple degraded tiles can be restored based on adifferent restoration type. That is, the filtering and subspaceprojection described above can also be referred to as a self-guidedfilter restoration type. Other possible restoration types can be basedon a Wiener filter or a bilateral filter. When multiple restorationtypes are available, the restoration type for the current tile can alsobe encoded into the bitstream at 606.

The parameters, and optionally the restoration type, can be encoded intoa frame header, a slice header, a block header, or combinations of theseheaders. The identification of the tiles used in the reconstructionprocess can also be transmitted within the bitstream. Alternatively,parameters used for the partitioning can be transmitted within thebitstream so that a decoder, such as the decoder 500, can recreate thetiles during the decoding process.

A decoder uses the restoration and projection parameters (and therestoration type, when available), to obtain a reconstructed tile asdescribed with respect to FIG. 10.

FIG. 10 is a flowchart diagram of a process 1000 for restoring adegraded frame at a decoder according to an implementation of thisdisclosure. The process 1000 can be performed by a decoder such as thedecoder 500. For example, the process 1000 can be performed in whole orin part by loop filter stage 512 of the decoder 500. Implementations ofthe process 1000 can be performed by storing instructions in a memorysuch as the memory 204 of the receiving station 106 to be executed by aprocessor such as CPU 202, for example.

The process 1000 can be implemented using specialized hardware orfirmware. Some computing devices can have multiple memories, multipleprocessors, or both. The steps or operations of the process 1000 can bedistributed using different processors, memories, or both. Forsimplicity of explanation, the process 1000 is depicted and described asa series of steps or operations. However, the teachings in accordancewith this disclosure can occur in various orders and/or concurrently.Additionally, steps in accordance with this disclosure can occur withother steps not presented and described herein. Furthermore, not allillustrated steps or operations can be used to implement a method inaccordance with the disclosed subject matter.

The process 1000 occurs either in whole or in part after the decodergenerates a degraded tile of a source frame. The degraded tile can be,for example, all or a portion of a reconstructed frame from areconstruction loop of the decoder. Again, this frame is referred to asa degraded frame so as to distinguish it from the final reconstructedframe after filtering. For example, all or a portion of the degradedframe could be received from the reconstruction stage 510 at thedeblocking filtering stage 514 of the decoder 500. The decoder 500 canbe arranged such that the deblocking filtering stage 514 is before theloop filter stage 512. Alternatively, another filter stage can belocated after the deblocking filter stage 514. The degraded frame fromthe reconstruction stage 510 can be deblocked before the process 1000occurs.

At 1002, projection parameters are determined from the encodedbitstream. For example, in the case where two guide tiles are to be usedin the projection operation, the process 1000 can decode a firstprojection parameter (e.g., a projection parameter a) and a secondprojection parameter (e.g., a projection parameter β) from the encodedbitstream. The projection parameters can be determined by decoding themfrom the header in which they were inserted by an encoder. Parameters,such as the projection parameters, are inserted in headers as describedabove with respect to FIG. 6.

At 1004, restoration parameters are determined from the received encodedbitstream. For example, in the case where two guide tiles are to be usedin the projection operation, the process 1000 can determine firstrestoration parameters (e.g., a radius r₁ and a noise e₁) and secondrestoration parameters (e.g., a radius r₂ and a noise e₂). In an examplewhere the restoration parameters are encoded into the bitstream, theycan be determined by decoding them from the header in which they wereinserted by an encoder. In an example where a codebook is used toproduce and index for inclusion in the bitstream, the index is decodedfrom the header in which it was inserted by the encoder. The decodedindex can be used to determine the restoration parameters thatcorrespond to the entry identified by the index.

At 1006, guide tiles for the current degraded tile are generated. Forexample, in the case where two guide tiles are to be used in theprojection operation, a first guide tile for a degraded tile isgenerated using the first restoration parameters, and a second guidetile for the degraded tile is generated using the second restorationparameters. The first guide tile and the second guide tile can begenerated in accordance with the process 700 of FIG. 7 using the currentdegraded tile.

At 1008, a projection operation is performed to generate a reconstructedtile of a degraded tile. In the case where two guide tiles are used inthe projection operation, the projection operation is performed usingthe first guide tile, the second guide tile, the first restorationparameters, and the second restoration parameters. For example, theprojection operation can be performed using the equation (4). Theprojection operation includes a first term relating differences betweena source tile of the source frame and the degraded tile to differencesbetween the first guide tile and the degraded tile using the firstrestoration parameters, and a second term relating the differencesbetween the source tile of the source frame and the degraded tile todifferences between the second guide tile and the degraded tile usingthe second restoration parameters.

The process 1000 of FIG. 10 can be repeated as needed, i.e., if thedegraded frame constitutes more than one tile, until the reconstructedframe is completed for inclusion as part of the output video stream,such as the output video stream 516 of FIG. 5.

If different restoration types are used for the frame, the restorationtype for the tile can be decoded from header in which it was encoded.The process 1000 occurs if restoration type is the self-guided filterrestoration type. If another restoration type is used, the appropriatefilter (e.g., a Wiener filter or a bilateral filter) can instead be usedin the reconstruction process.

The aspects of encoding and decoding described above illustrate someencoding and decoding techniques. However, it is to be understood thatencoding and decoding, as those terms are used in the claims, could meancompression, decompression, transformation, or any other processing orchange of data.

The words “example” or “implementation” are used herein to mean servingas an example, instance, or illustration. Any aspect or design describedherein as “example” or “implementation” is not necessarily to beconstrued as preferred or advantageous over other aspects or designs.Rather, use of the words “example” or “implementation” is intended topresent concepts in a concrete fashion. As used in this application, theterm “or” is intended to mean an inclusive “or” rather than an exclusive“or”. That is, unless specified otherwise, or clear from context, “Xincludes A or B” is intended to mean any of the natural inclusivepermutations. That is, if X includes A; X includes B; or X includes bothA and B, then “X includes A or B” is satisfied under any of theforegoing instances. In addition, the articles “a” and “an” as used inthis application and the appended claims should generally be construedto mean “one or more” unless specified otherwise or clear from contextto be directed to a singular form. Moreover, use of the term “animplementation” or “one implementation” throughout is not intended tomean the same embodiment or implementation unless described as such.

Implementations of transmitting station 102 and/or receiving station 106(and the algorithms, methods, instructions, etc., stored thereon and/orexecuted thereby, including by encoder 400 and decoder 500) can berealized in hardware, software, or any combination thereof. The hardwarecan include, for example, computers, intellectual property (IP) cores,application-specific integrated circuits (ASICs), programmable logicarrays, optical processors, programmable logic controllers, microcode,microcontrollers, servers, microprocessors, digital signal processors orany other suitable circuit. In the claims, the term “processor” shouldbe understood as encompassing any of the foregoing hardware, eithersingly or in combination. The terms “signal” and “data” are usedinterchangeably. Further, portions of transmitting station 102 andreceiving station 106 do not necessarily have to be implemented in thesame manner.

Further, in one aspect, for example, transmitting station 102 orreceiving station 106 can be implemented using a general purposecomputer or general purpose processor with a computer program that, whenexecuted, carries out any of the respective methods, algorithms and/orinstructions described herein. In addition, or alternatively, forexample, a special purpose computer/processor can be utilized which cancontain other hardware for carrying out any of the methods, algorithms,or instructions described herein.

Transmitting station 102 and receiving station 106 can, for example, beimplemented on computers in a video conferencing system. Alternatively,transmitting station 102 can be implemented on a server and receivingstation 106 can be implemented on a device separate from the server,such as a hand-held communications device. In this instance,transmitting station 102 can encode content using an encoder 400 into anencoded video signal and transmit the encoded video signal to thecommunications device. In turn, the communications device can thendecode the encoded video signal using a decoder 500. Alternatively, thecommunications device can decode content stored locally on thecommunications device, for example, content that was not transmitted bytransmitting station 102. Other transmitting station 102 and receivingstation 106 implementation schemes are available. For example, receivingstation 106 can be a generally stationary personal computer rather thana portable communications device and/or a device including an encoder400 can also include a decoder 500.

Further, all or a portion of implementations of the present disclosurecan take the form of a computer program product accessible from, forexample, a tangible computer-usable or computer-readable medium. Acomputer-usable or computer-readable medium can be any device that can,for example, tangibly contain, store, communicate, or transport theprogram for use by or in connection with any processor. The medium canbe, for example, an electronic, magnetic, optical, electromagnetic, or asemiconductor device. Other suitable mediums are also available.

The above-described embodiments, implementations and aspects have beendescribed in order to allow easy understanding of the present disclosureand do not limit the present disclosure. On the contrary, the disclosureis intended to cover various modifications and equivalent arrangementsincluded within the scope of the appended claims, which scope is to beaccorded the broadest interpretation so as to encompass all suchmodifications and equivalent structure as is permitted under the law.

What is claimed is:
 1. A method of restoring a degraded frame resultingfrom reconstruction of a source frame, the method comprising:generating, using first restoration parameters, a first guide tile for adegraded tile of the degraded frame; determining a projection parameterfor a projection operation, the projection operation relatingdifferences between a source tile of the source frame and the degradedtile to differences between the first guide tile and the degraded tile;and encoding, in an encoded bitstream, the first restoration parametersand the projection parameter.
 2. The method of claim 1, whereingenerating the first guide tile comprises: selecting a radius and anoise value from a codebook of radii and noise values; for each pixel ata pixel location of the degraded tile: determining a pixel mean and apixel variance relative to pixel values of the degraded tile in a firstwindow centered at the pixel using the radius; determining a baselinevalue, using the pixel variance and the noise value; determining asmoothing value using the pixel mean and the baseline value; determiningan average baseline value and an average smoothing value using pixelvalues of the degraded tile in a second window centered at the pixel;and determining a guide pixel value in the pixel location of the firstguide tile based on a co-located pixel value in the degraded tile, theaverage baseline value and the average smoothing value.
 3. The method ofclaim 2, wherein the first window has a same size as the second window.4. The method of claim 2, wherein the second window is a 3×3 window. 5.The method of claim 2, wherein the average baseline value isapproximated using a weighted sum, by: assigning a weight to at leastsome pixel locations of the second window such that a sum of the weightsis a power of 2; calculating the weighted sum; and bit-shifting theweighted sum by the power of
 2. 6. The method of claim 1, wherein theprojection operation comprises respective difference terms, eachdifference term using a respective guide tile, and wherein theprojection parameter comprises a respective projection parameter foreach respective difference term.
 7. The method of claim 1, furthercomprising: generating, based on second restoration parameters, a secondguide tile for the degraded tile, wherein determining a projectionparameter for a projection operation comprises: determining projectionparameters for the projection operation, the projection operationfurther relating the differences between the source tile of the sourceframe and the degraded tile to differences between the second guide tileand the degraded tile.
 8. The method of claim 1, further comprising:selecting the first restoration parameters from a codebook.
 9. Anapparatus for restoring a degraded frame resulting from reconstructionof a source frame, comprising: a processor configured to executeinstructions stored in a non-transitory storage medium to: generate,using first restoration parameters, a first guide tile for a firstdegraded tile of the degraded frame; determine a projection parameterfor a projection operation; and encode, in an encoded bitstream, thefirst restoration parameters and the projection parameter.
 10. Theapparatus of claim 9, wherein the instructions stored in thenon-transitory storage medium to generate the first guide tile compriseinstructions executables by the processor to: select a radius and anoise value from a codebook of radii and noise values; for a pixellocation of the first degraded tile: determine a pixel mean and a pixelvariance relative to pixel values of the first degraded tile within afirst window about the pixel location using the radius; determine abaseline value, using the pixel variance and the noise value; determinea smoothing value using the pixel mean and the baseline value; determinean average baseline value and an average smoothing value using pixelvalues of the first degraded tile in a second window surrounding thepixel location; and determine a guide pixel value in the pixel locationof the first guide tile using a co-located pixel value in the firstdegraded tile, the average baseline value and the average smoothingvalue.
 11. The apparatus of claim 10, wherein the first window has asame size as the second window.
 12. The apparatus of claim 10, whereinthe second window is a 3×3 window.
 13. The apparatus of claim 10,wherein the processor is configured to approximate the average smoothingvalue using a weighted sum by executing instructions stored in thenon-transitory storage medium to: assign a weight to each pixel locationof the second window such that a sum of the weights is a power of 2;calculate the weighted sum; and bit-shift the weighted sum by the powerof
 2. 14. The apparatus of claim 9, wherein the projection operationcomprises respective difference terms, each difference term using arespective guide tile, and the projection parameter comprises arespective different projection parameter for each respective differenceterm.
 15. The apparatus of claim 9, wherein the processor is furtherconfigured to execute instructions stored in the non-transitory storagemedium to: generate, based on second restoration parameters, a secondguide tile for the first degraded tile, wherein determining theprojection parameter comprises determining projection parameters for theprojection operation.
 16. The apparatus of claim 9, wherein theprocessor is further configured to execute instructions stored in thenon-transitory storage medium to: select the first restorationparameters from a codebook.
 17. The apparatus of claim 9, wherein theprocessor is further configured to execute instructions stored in thenon-transitory storage medium to: encode, in the encoded bitstream, afirst restoration type for the first restoration parameters and theprojection parameter; and generate, based on a second restoration type,a second guide tile for a second degraded tile of the degraded frame,wherein the second restoration type is selected from a set comprising aWiener filter and a bilateral filter.
 18. A method of restoring adegraded frame, the method comprising: determining, from an encodedbitstream, a first projection parameter and a second projectionparameter; determining, from the encoded bitstream, first restorationparameters and second restoration parameters; generating, using thefirst restoration parameters, a first guide tile for a degraded tile ofthe degraded frame; generating, using the second restoration parameters,a second guide tile for the degraded tile; and performing a projectionoperation using the first guide tile, the second guide tile, the firstrestoration parameters, and the second restoration parameters togenerate a reconstructed tile of a reconstructed frame.
 19. The methodof claim 18, wherein the projection operation comprises a first termrelating differences between a source tile of a source frame and thedegraded tile to differences between the first guide tile and thedegraded tile using the first restoration parameters, and a second termrelating the differences between the source tile of the source frame andthe degraded tile to differences between the second guide tile and thedegraded tile using the second restoration parameters.
 20. The method ofclaim 18, wherein determining the first restoration parameters and thesecond restoration parameters comprises: determining, from the encodedbitstream, a first index in a codebook for the first restorationparameters; retrieving the first restoration parameters from thecodebook based on the first index; determining, from the encodedbitstream, a second index in the codebook for the second restorationparameters; and retrieving the second restoration parameters from thecodebook based on the second index.